6.1 Introduction to Static Routing  
  6.1.3 Configuring static routes  
This section lists the steps for configuring static routes and gives an example of a simple network for which static routes might be configured.

Use the following steps to configure static routes:

  1. Determine all desired destination networks, their subnet masks, and their gateways. A gateway can be either a local interface or a next hop address that leads to the desired destination.
  2. Enter global configuration mode.
  3. Type the ip route command with a destination address and subnet mask followed by their corresponding gateway from Step one. Including an administrative distance is optional.
  4. Repeat Step three for as many destination networks as were defined in Step one.
  5. Exit global configuration mode.
  6. Save the active configuration to NVRAM by using the copy running-config startup-config command.

The example network is a simple three-router configuration. Hoboken must be configured so that it can reach the 172.16.1.0 network and the 172.16.5.0 network. Both of these networks have a subnet mask of 255.255.255.0.

Packets that have a destination network of 172.16.1.0 need to be routed to Sterling and packets that have a destination address of 172.16.5.0 need to be routed to Waycross. Static routes can be configured to accomplish this task.

Both static routes will first be configured to use a local interface as the gateway to the destination networks. Since the administrative distance was not specified, it will default to 0 when the route is installed in the routing table. Note that an administrative distance of 0 is the same as a directly connected network.

The same two static routes can also be configured using a next-hop address as their gateway. The first route to the 172.16.1.0 network has a gateway of 172.16.2.1. The second route to the 172.16.5.0 network has a gateway of 172.16.4.2. Since the administrative distance was not specified, it defaults to 1.

 

Lab Activity

e-Lab Activity: Configuring Static Routes

In this lab, the student will learn to configure some static routes.

 
 

Web Links

ip route Command

http://www.cisco.com/en/US/products/sw/ iosswrel/ps1835/products_command_reference_ chapter09186a00800ca75a.html#1018067